//
//  PopViewTableViewCell.m
//  ZZLogistics
//
//  Created by 辰领科技 on 15/12/4.
//  Copyright © 2015年 辰领科技. All rights reserved.
//

#import "PopViewTableViewCell.h"

@implementation PopViewTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    //    self.backgroundColor = [UIColor colorWithWhite:0.910 alpha:1.000];
    if (self) {
        
        _numberButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _numberButton.frame = flexibleFrame(CGRectMake(9, 18, 18, 18), NO);
        _numberButton.layer.borderColor = [UIColor colorWithWhite:0.192 alpha:1.000].CGColor;
        _numberButton.titleLabel.font =[UIFont systemFontOfSize: 15*VerticalTexeRatio()];
        _numberButton.layer.cornerRadius = 9*VerticalRatio();
        _numberButton.layer.borderWidth = 1;
        [_numberButton setTitleColor:[UIColor colorWithWhite:0.192 alpha:1.000] forState:UIControlStateNormal];
        [self.contentView addSubview:_numberButton];
        
        UILabel * label = [[UILabel alloc]initWithFrame:flexibleFrame(CGRectMake(16, 20, 10, 15), NO)];
        label.font = [UIFont systemFontOfSize:16*VerticalTexeRatio()];
        label.textColor = [UIColor colorWithWhite:0.184 alpha:1.000];
        label.textAlignment = NSTextAlignmentCenter;
        _numberLabel = label;
       
        
        UIView * line = [[UIView alloc]initWithFrame:flexibleFrame(CGRectMake(0, 50, 304, 1), NO)];
        line.backgroundColor = [UIColor colorWithWhite:0.882 alpha:1.000];
        
        UILabel * nameLabel = [[UILabel alloc]initWithFrame:flexibleFrame(CGRectMake(30, 20, 90, 15), NO)];
        nameLabel.font = [UIFont systemFontOfSize:15*VerticalTexeRatio()];
        nameLabel.textColor = [UIColor colorWithWhite:0.184 alpha:1.000];
        nameLabel.textAlignment = NSTextAlignmentLeft;
        _nameLabel = nameLabel;
        
        UILabel * priceLabel = [[UILabel alloc]initWithFrame:flexibleFrame(CGRectMake(125, 20, 60, 15), NO)];
        priceLabel.font = [UIFont systemFontOfSize:15*VerticalTexeRatio()];
        priceLabel.textColor = [UIColor colorWithRed:0.788 green:0.490 blue:0.000 alpha:1.000];
        priceLabel.textAlignment = NSTextAlignmentLeft;
        _priceLabel = priceLabel;
        
        
        UILabel * timeLabel = [[UILabel alloc]initWithFrame:flexibleFrame(CGRectMake(185, 20, 45, 15), NO)];
        timeLabel.font = [UIFont systemFontOfSize:14*VerticalTexeRatio()];
        timeLabel.textColor = [UIColor colorWithWhite:0.463 alpha:1.000];
        timeLabel.textAlignment = NSTextAlignmentLeft;
        _timeLabel = timeLabel;
        
        
        UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.backgroundColor = [UIColor colorWithRed:0.910 green:0.267 blue:0.302 alpha:1.000];
        button.frame = flexibleFrame(CGRectMake(235, 12, 56, 28), NO);
        [button setTitle:@"指定" forState:UIControlStateNormal];
        button.layer.cornerRadius = 4*VerticalRatio();
        button.titleLabel.font = [UIFont systemFontOfSize:15*VerticalTexeRatio()];
        [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _button = button;
        
        [self.contentView addSubview:nameLabel];
        [self.contentView addSubview:priceLabel];
        [self.contentView addSubview:timeLabel];
        [self.contentView addSubview:button];
        [self.contentView addSubview:label];
        [self.contentView addSubview:line];
        
    }
    return self;
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
